import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import nodejs from '@dfeidao/atom-web/msg/nodejs';
import render from '@dfeidao/atom-web/render/render';
// import pn_sty from '@dfeidao/fd-w000010';
import p001 from './p001';

export default async function a007(fd: IFeidaoAiBrowserComponent) {
	// todo
	// const name = fd.data.node.querySelector<HTMLInputElement>('[data-id="equip_name"]');
	// console.log(name.value);
	const v1 = fd.data.node.querySelector<HTMLSelectElement>('[data-id="select_1"]');
	const v2 = fd.data.node.querySelector<HTMLInputElement>('[data-id="equip_name_1"]');
	const v3 = fd.data.node.querySelector<HTMLSelectElement>('[data-id="select_2"]');
	console.log(v1.value);
	console.log(v2.value);
	console.log(v3.value);

	const res = await nodejs('device-management-ygh/zj-000002/s001', {
		page: {
			value1: v1.value,
			value2: v2.value,
			value3: v3.value,
			page_no: 1
		}
	});
	console.log(res);
	render(fd, res, p001, 'p001', 'inner');
	// set(fd, 'page-no', pn);
}
